//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { UnipayConfig, UnipayConfigResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooUnipayConfigList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<UnipayConfigResponse>(`/uctoo/unipay_config/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooUnipayConfig = async (id: string) => {
  return requestClient.get<UnipayConfig>(`/uctoo/unipay_config/${id}`);
};

export const adductooUnipayConfig = async (data: Partial<UnipayConfig>) => {
  return requestClient.post<UnipayConfig>('/uctoo/unipay_config/add', data);
};

export const edituctooUnipayConfig = async (data: Partial<UnipayConfig>) => {
  return requestClient.post<UnipayConfig>('/uctoo/unipay_config/edit', data);
};

export const deleteuctooUnipayConfig = async (id: string) => {
  return requestClient.post<any>('/uctoo/unipay_config/del', { id });
};
